The present invention relates to a defective block reassignment processing method and system for an external storage apparatus such as a hard disk apparatus and the like. More particularly, the present invention is concerned with a defective block reassignment processing system for an external storage apparatus in which load of software in a host system can be reduced, in a data processing system connected to the host system through a software interface such as an SCSI interface.
In general, in an external storage apparatus such as a hard disk apparatus and others, a replacing or spare block area is previously reserved on a recording medium, and when a defective block is found, block reassignment processing is performed.
Heretofore, the block reassignment processing for replacing a defective block has been performed in a manner which will be outlined below. Assuming that a read/write request is issued from a host system and that a block in an external storage apparatus such as a hard disk apparatus which block is relevant to that request is defective, an abnormal end due to a defect of the recording medium is informed to the host system. Upon reception of the abnormal end information, the host system issues to the hard disk apparatus a command for commanding the replacement of the defective block (this command is generally referred to as a reassign block command). In response to the reassign block command, the hard disk apparatus reassigns the spare block area to the defective block. When a spare block is no longer available in the spare block area, the reassign block command is terminated in the check condition status and a medium error is set in a sense key, which means that the command has been ended abnormally in an unrecoverable error state because of the defect in the recording medium or error of recorded data.
An example of such block reassignment processing scheme for a hard disk apparatus with an SCSI interface is disclosed in Section 8.1.3 entitled "Explanation of REASSIGN BLOCKS Command" "Japanese Version of the ANSI Standards X3.131-1986" (published by the Japanese Standards Association).
It is however noted that when the defective block reassignment processing is performed by the hard disk apparatus in response to the reassign block command issued by the host system the information of the medium error due to unavailability of a spare block area means wastage involved in the processing and should preferably be evaded in advance. To this end, it is necessary to suppress the issuance of such reassign block command by the host system which ultimately results in issuance of the medium error information of unavailability of the spare block area from the hard disk apparatus. Under the circumstances, the number of the spare blocks remaining unused in the spare block area of the hard disk apparatus has heretofore been managed by the host system. However, since the size of the spare block area differs from one after another manufacture of hard disk apparatuses and in dependence on the capacity thereof, the spare block number management performed by a host system to which a variety of hard disk apparatuses are connected become considerably complicated. Besides, a lot of time is taken for the program-based processing for the block reassignment, involving degradation in the system performance to a problem.
Another disadvantage of a hard disk apparatus with an SCSI interface or the like can be seen in that although the interface is regulated in accordance with the ANSI Standards, the specifications thereof tend to differ from one to another disk manufacture, particularly in the case of software interface because of rather lenient regulation, which makes it difficult for the host system to alter or modify the interface specifications in a facilitated manner.